package com.lanchetech.common.enums;

import lombok.Getter;

@Getter
public enum UserLevelEnum {
    CUSTOMER(0, "游客"),

    MEMBER_L1(1, "会员"),
    MEMBER_L2(2, "主管"),
    MEMBER_L3(3, "经理"),
    MEMBER_L4(4, "总监"),

    PARTNER_L1(5, "达人"),
    PARTNER_L2(6, "主管"),
    PARTNER_L3(7, "经理"),
    PARTNER_L4(8, "总监"),

    SHAREHOLDER_L1(9, "运营中心"),
    SHAREHOLDER_L2(10, "副总裁"),
    SHAREHOLDER_L3(11, "总裁"),
    SHAREHOLDER_L4(12, "董事"),

    VIP(13, "主管"),
    SHOP(14, "店长"),
    CITY_CEO(15, "城市CEO"),
    GENERAL_MANAGER(16, "总经理"),
    JKJ_PRESIDENT(17, "董事长"),

    PARTNER_DIRECTOR(100, "联合创始人（同时送一个合伙人）"),
    COMPANY(101, "分公司"),
    AGENCY(102, "代理"),
    ;
    private Integer level;
    private String remark;

    UserLevelEnum(Integer level, String remark) {
        this.level = level;
        this.remark = remark;
    }

    public static UserLevelEnum getByLevel(Integer level) {
        for (UserLevelEnum item : UserLevelEnum.values()) {
            if (item.getLevel().equals(level)) {
                return item;
            }
        }
        return null;
    }
}
